Skip to content

Keep failed database saves out of the retry queue - #235

Merged
melekr merged 2 commits into
masterfrom
bugfix/database-failed-save-cleanup
Nov 25, 2026
Merged

melekr merged 2 commits into
masterfrom
bugfix/database-failed-save-cleanup

Conversation

@melekr

@melekr melekr commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

A failed report save could leave temporary files behind and add an incomplete record to the retry queue. Give each write its own staging file, preserve the original error if cleanup fails, and leave existing destination files intact. Add a record to the retry queue only after its payload and metadata save successfully.

fix(database): discard failed report saves

  • Use a unique staging file for each write and clean it up after a write or rename failure. Preserve the original error if cleanup also fails.
  • Remove partial report files before returning from a failed save and keep incomplete records out of the retry queue.

ref: BT-8174

Use a unique staging file for each write and clean it up after a write or rename failure. Preserve the original error if cleanup also fails.

Remove partial report files before returning from a failed save and keep incomplete records out of the retry queue.
@melekr melekr self-assigned this Nov 25, 2026
@melekr

melekr commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

github actions down/outage.

Apply Spotless formatting to the JUnit rule declaration and the BacktraceData constructor call.
@melekr
melekr merged commit 05bba8c into master Nov 25, 2026
21 of 22 checks passed
@melekr
melekr deleted the bugfix/database-failed-save-cleanup branch November 25, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant